package servlet.ware;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import model.Orders;

/**
 * Servlet implementation class GoodslessenServlet
 */
@WebServlet("/goods_lessen")
public class ware_lessen_Servlet extends HttpServlet {


	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
		Orders o =(Orders) request.getSession().getAttribute("orders");
		int goodsid = Integer.parseInt(request.getParameter("goodsid"));
		o.lessen(goodsid);
		response.getWriter().print("ok");
	}

}
